<template>
    <h2>会员信息</h2>
    <table>
        <thead>
            <tr>
                <th>姓名</th>
                <th>手机号</th>
                <th>邮箱</th>
                <th>地址</th>
                <th>爱好</th>
                <th>习惯</th>
                <th>年龄</th>
                <th>身份证号</th>
            </tr>
        </thead>
        <tbody v-for="a in data">
            <tr>
                <th>{{a.name}}</th>
                <th>{{a.phone}}</th>
                <th>{{a.email}}</th>
                <th>{{a.adder}}</th>
                <th>{{a.aihao}}</th>
                <th>{{a.xiguan}}</th>
                <th>{{a.age}}</th>
                <th>{{a.sfz}}</th>
            </tr>
        </tbody>
    </table>
</template>

<script setup lang="ts">
import { ref,onMounted } from 'vue';
import axios from 'axios';

onMounted(()=>{
    shoow()
})

const data=ref([{
    "mid": 0,
    "name": "",
    "phone": "",
    "email": "",
    "adder": "",
    "aihao": "",
    "xiguan": "",
    "age": "",
    "sfz": ""
}])

 const shoow=()=>{
 axios.get("https://localhost:7253/api/VS/Show",{params:data.value}).then(res=>{
         data.value=res.data;
 })
 }


</script>

<style scoped>

</style>